import Layout from '@/views/layout/Layout';

// 控制这系列页面的权限
const authData = {
  chatGpt: ['crm:chatGpt:read'] // chatGpt
};
let pageAllAuth = [];
for (const key in authData) {
  pageAllAuth = pageAllAuth.concat(authData[key]);
}

// 首页
const chatRouter = [{
  path: '/chatGpt',
  component: Layout,
  redirect: '/chatGpt',
  name: 'chatGpt',
  hidden: true,
  meta: { title: 'ChatGPT', icon: 'sidebar-chat', authControl: pageAllAuth },
  children: [{
    path: 'chatGpt',
    name: 'chatGptPage',
    component: () => import('@/views/chatGpt/index'),
    meta: { title: 'ChatGPT', keepAlive: false, isChange: true, headerBarShow: false, authControl: authData.chatGpt }
  }]
}];

export default chatRouter;
